﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DapperExtensions.Mapper;
using Newtonsoft.Json;
using ZL.CRM.CommonEntity.AccYwDetail;
using ZilLion.Service.Core.Domain.EntityBase.JsonConverter;

namespace ZL.CRM.CommonEntity.Common
{
    public class ChikrXinx
    {
        
        /// <summary>
        /// 操作记录流水号
        /// </summary>
        public string OprSno { get; set; }

        /// <summary>
        ///  客户姓名
        /// </summary>
        public string AccKhName { get; set; }

        /// <summary>
        ///  性别标记说明
        /// </summary>
        public string AccSex { get; set; }

        /// <summary>
        ///  出生日期
        /// </summary>
        public string AccBrith { get; set; }

        /// <summary>
        ///  手机号（参照电话，格式不一定对）
        /// </summary>
        public string AccPhoneNo { get; set; }

        /// <summary>
        ///  休眠密码=手机号+|+0~8位密码
        /// </summary>
        public string AccSleepPwd { get; set; }


        /// <summary>
        ///  证件号码
        /// </summary>
        public string AccCredno { get; set; }

        /// <summary>
        ///  通讯地址
        /// </summary>
        public string AccAddr { get; set; }

        /// <summary>
        /// 编辑时间
        /// </summary>
        [JsonConverter(typeof(ChinaDateTimeConverter))]
        public DateTime OprTime { get; set; }

        /// <summary>
        /// 编辑机构id
        /// </summary>
        public int OprBrid { get; set; }

        /// <summary>
        /// 编辑机构
        /// </summary>
        public string OprBrName { get; set; }

        public string OprJson { get; set; }

        /// <summary>
        /// 编辑前账户信息
        /// </summary>
        public string AccInfoBef { get; set; }

    }
    public class ChikrXinxMapper : ClassMapper<ChikrXinx>
    {
        public ChikrXinxMapper()
        {
            Table("#YwCore");
            Map(f => f.OprSno).Column("OprSno");
            Map(f => f.AccKhName).Column("AccKhName");
            Map(f => f.AccSex).Column("AccSex");
            Map(f => f.AccBrith).Column("AccBrith");
            Map(f => f.AccPhoneNo).Column("AccPhoneNo");
            Map(f => f.AccSleepPwd).Column("AccSleepPwd");
            Map(f => f.AccCredno).Column("AccCredno");
            Map(f => f.AccAddr).Column("AccAddr");
            Map(f => f.OprTime).Column("OprTime");
            Map(f => f.OprBrid).Column("OprBrid");
            Map(f => f.OprBrName).Column("OprBrName");
            Map(f => f.OprJson).Column("OprJson");
            Map(f => f.AccInfoBef).Column("AccInfoBef");
        }
    }

}
